-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: export performance data #54412
base: main
Are you sure you want to change the base?
feat: export performance data #54412
Conversation
b1924cb
to
64a637a
Compare
cc @mountiny @hannojg I'm testing this now further, but for a TLDR I reworked how the whole Performance module is being declared. I figured why its' init has been postponed until invoked (dynamic require) and moved the possible 'heavy' workload into opt-in calls - the dependency module (react-native-performance) is now always there, but does ~nothing until invoked because all the observers are turned off by default. This enables us to:
If any part of the profiling turns to be too heavy during runtime measurements, we can turn turn it off and stick to the debug workflows (eg. for resource logging). |
Also moved the |
@rayane-djouah can you please test and review this PR? @adhorodyski, can you please add testing steps to make sure everything related to performance monitoring works as expected after this change? |
Yes, I will update these in a few hours. I tested this on web + mobile ios (works fine), will also run on mobile android. |
@hannojg / @kirillzyusko can I ask you to help verify if the e2e tests pass fine for you with these updates? Changes included here should be transparent and non-breaking :) |
@mountiny I'm still fighting with Android builds today to verify on this platform. I'll update when done. Please let me know if there's anything else missing on my end. |
4fa0b75
to
48e5d1b
Compare
@tgolen addressed all the comments, thanks! |
Ready for @rayane-djouah to review and test. |
Managed to finally run on Android, spotted one bug that prints the TTI metric under Edit: all good across the platforms cc @mountiny |
I run However, Additionally, I tried starting profiling in a dev build on iOS native, and the app crashed. Could this be due to the absence of a source map? @adhorodyski, if possible, could you clarify the test steps further? Thanks! |
@mountiny @hannojg
Explanation of Change
This PR adds support for exporting performance measures collected during a profiling session with the
Use Profiling
debug feature. They are added to the AppInfo file under theperformance
property.I've attached a recording from web with additional debug logs to visualize what gets fired when we enable the profiler now.
Fixed Issues
$ #50652
PROPOSAL: N/A
Tests
Same as the QA steps.
Offline tests
Same as the QA steps.
QA Steps
open_report*
entries.AppInfo<app version>.json
file. This should now include aperformance
property on it. It's an array of measures collected during the profiling session. They should reflect actions successfully collected with thePerformance.markStart/End()
API.PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
devtools.mp4
MacOS: Desktop